#include <iostream>
#include <string.h>
using namespace std;
int prime[100];
int count=0;
int main()
{
	int i,j;
	int a[100];
	memset(a,0,sizeof(a));
	a[0]=1;
	a[1]=1;
	for(i=2;i<=100;i++){
		for(j=2;j<=100&&i*j<=100;j++) a[i*j]=1;
	}
	for(int k=0;k<=100;k++){
		if(a[k]==0){
			prime[count]=k;
			count++;
		}
	}
	int n;
	while(cin>>n){
		int maxp=0;
		int p[100];
		memset(p,0,sizeof(p));
		for(int l=2;l<=n;l++){
			int m=l;
			for(int ll=0;ll<count;ll++){
				while(m%prime[ll]==0){
					p[ll]++;
					m=m/prime[ll];
					if(ll>maxp){
						maxp=ll;
					}
				}
			}
		}
		cout<<n<<"!=";
		for(i=0;i<=maxp;i++){
			cout<<p[i]<<" ";
		}
	}
}
